#ifndef __FILTER_H__
#define __FILTER_H__

#include "sys.h"
#include "stdio.h"

/*限幅滤波参数*/
typedef struct
{
	float valu;
	float NewValue;
	float FILTER_A;
}lim_filter;

/*滑动均值滤波法*/
typedef struct
{
	float *move_filter_buf;
	u8 buf_length;
}move_average;

/*限幅平均滤波法*/
typedef struct
{
	float *limit_avg_filter_buf;
	u8 buf_length;
	float FILTER_A;
}limit_average;
typedef struct
{
	float value;
	float First_order_FILTER_A;
	float filter_out;
}first_order_lag_info;


float limiting_filter(float Value,lim_filter *lim);
float median_filter(float *filter_buf,u8 filter_data_length);
float arc_average_filter(float *filter_buf,u8 filter_data_length);
float move_average_filter(float get_value,move_average *move_filter);
float median_average_filter(float *filter_buf,u8 filter_data_length);
float limit_average_filter(float get_value,limit_average *limit);
void  first_order_lag_filter(float value_s,first_order_lag_info *first_order_lag_info_s);
#endif

